package com.danskin.wechat.service;

import java.util.List;
 
import com.danskin.wechat.entity.CustCouponRecord;
import com.danskin.wechat.entity.WxMediaPlatform;
import com.danskin.wechat.util.Page;
import com.danskin.wechat.vo.CustCouponApiView;

public interface CouponService {

	/**
	 * 新增用户领取优惠券记录
	 * 
	 * @param custCouponRecord
	 * @return
	 */
	int saveCustCouponRecord(CustCouponRecord entity, WxMediaPlatform mp);

	List<CustCouponApiView> listPageByOpenId(Page page, String type);

	CustCouponApiView findCustCouponView(int couponId, String appId);

	int setCustCouponWxGet(int mpId, String couponNo);

	CustCouponRecord findCustCoupon(int couponId, String couponNo);

	/**
	 * 根据条件查询 可用券数量
	 * 
	 * @param custCouponRecord
	 * @return
	 */
	int selectAvaCouponByCondition(CustCouponRecord custCouponRecord);
}
